<?php
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$this->headTitle()->setSeparator(' - ');
$this->headTitle('Selamat Datang di BitzPlaza');
echo $this->doctype('XHTML1_TRANSITIONAL') . "\n";
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
            <script type="text/javascript" src="<?= $this->baseUrl() ?>/js/jquery-1.2.1.pack.js"></script>
            <!--[if lte IE 6]>
			<script type="text/javascript">var IE7_PNG_SUFFIX = ".png";</script>
            <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js"></script>
            <![endif]-->
            <link rel="stylesheet" href="<?= $this->baseUrl() ?>/css/front.css" />

            <script type="text/javascript">


                $(document).ready(function() {
                    setInterval(function(){$.post("<?= $this->url(array('controller' => 'frontPage',
                        'action' => 'afterlogin')) ?>",function(data){
                         if(data.length > 2) {

                             $('#alertNotif').html(data);
                             document.title="<?=$this->headTitle()?> <?php
$this->sessioncontroller->setBuyer();

$counts = $this->transactions->countRows("buyer_id=" . $this->sessioncontroller->getSessionId() . " and transaction_status_id=1");
if ((int) $counts > 0) {
    echo '[' . $counts . ']';
}
?>";}else{document.title="FRONT PAGE";}
                             });}, 30000);
                     });

            </script>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>

        </head>

        <body><div id="wrapper">

                <div id="top">
                    <div id="logo">
                        <a href="<?= $this->baseUrl() ?>/FrontPage"><img src="<?= $this->baseUrl() ?>/images/icons/logo.png" /></a>
                    </div>
                    <div id="topshadow"><img src="<?= $this->baseUrl() ?>/images/icons/topshadow.png" /></div>
                    <div id="links">
                        <input type="text" name="txtsearch" id="txtsearch" value="" />
                        <input type="button" name="btnsearch" id="btnsearch" value="" />
                        <span style="margin-right: 0px;"><img src="<?= $this->baseUrl() ?>/images/icons/search-separator.png" /></span>
                        <a href="#" title="Twitter"><img src="<?= $this->baseUrl() ?>/images/icons/twitter.png" /></a>
                        <a href="#" title="RSS"><img src="<?= $this->baseUrl() ?>/images/icons/rss.png" /></a>
                        <a href="#" title="Penanda Favorit"><img src="<?= $this->baseUrl() ?>/images/icons/contact.png" /></a>
                    </div>
                </div>
                <div id="nav">
                    <div id="menu">
                        <span style="color:#c0c0c0;">MENU</span>
                        <span><img src="<?= $this->baseUrl() ?>/images/icons/subarrow.png" /></span>
                        <span>TOKO</span>
                        <span>CARA BERBELANJA</span>
                        <span>TENTANG KAMI</span>
                        <span>KONTAK KAMI</span>
                    </div>
                </div>
                <div id="main">
                    <div id="left" class="content">
						<?php include 'frontcategory.php' ?>
                    </div>
                    <div id="center" class="content">
                        <?php echo $this->layout()->content; ?>
                    </div>
                    <div id="right" class="content">
                        <!-- <div class="label" style="margin-left:-2px;"><span style="margin:0px 5px;"><?= $this->rightlabel ?></span></div> -->
                        <div style="position:relative;">
                            <img id="label" src="<?= $this->baseUrl() ?>/images/icons/member-login.png" />
                            <div id="container">
                                <div id="text">
                                <?php if (isset($this->username)) echo "Selamat datang, " . $this->username . "!\n"; ?>
                                <?= $this->action($this->contentaction, $this->contentcontroller); ?>
                                </div>
                            </div>
                            <img id="shadow" src="<?=$this->baseUrl()?>/images/icons/shadow.png" />
                        </div>
                    </div>
                </div>
            </div></body>
    </html>